Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 5 - Bitmap Shapes


Summary of Bitmap Shapes

Constants and Data Types

The Bitmap Geometry Structure

typedef struct {
   char           *image;    /* pointer to the pixel image */
   long           width;     /* bitmap width */
   long           height;    /* bitmap height */
   long           rowBytes;  /* number of bytes per row */
   long           pixelSize; /* number of bits per pixel */
   gxColorSpace   space;     /* color space used to interpret pixel values */
   gxColorSet     set;       /* color set to use to interpret pixel values */
   gxColorProfile profile;   /* color matching information */
} gxBitmap;

The Long Rectangle Structure

struct gxLongRectangle {
   long     left;
   long     top;
   long     right;
   long     bottom;
};

Constants For Bitmaps With Disk-Based Pixel Images

#define  gxBitmapFileAliasImageValue   0x00000001
#define  gxBitmapFileAliasTagType      'bfil'

Bitmap Data Source Alias Structure

struct gxBitmapDataSourceAlias {
   unsigned long fileOffset;               /* file offset (in bytes) */
   unsigned long aliasRecordSize;          /* size of alias record */
   unsigned char aliasRecord[gxAnyNumber]; /* alias record */
};

Functions

Creating Bitmaps

gxShape GXNewBitmap	(const gxBitmap *data, const gxPoint *position);

Getting and Setting Bitmap Geometries

gxBitmap *GXGetBitmap	(gxShape source, const gxBitmap *data,
			const gxPoint *position);
void GXSetBitmap	(gxShape target, const gxBitmap *data,
			const gxPoint *position);

Editing Bitmaps

long GXGetShapePixel	(gxShape source, long x, long y, gxColor *data,
			long *index);
void GXSetShapePixel	(gxShape target, long x, long y, 
			const gxColor *newColor, long newIndex);
gxShape GXGetBitmapParts(gxShape source, const gxLongRectangle *bounds);
void GXSetBitmapParts	(gxShape target, const gxLongRectangle *bounds,
			gxShape bitmapShape);

Drawing Bitmaps

void GXDrawBitmap	(const gxBitmap *data, const gxPoint *position);

Checking Bitmap Colors

gxShape GXCheckBitmapColor	(gxShape source, 
				const gxLongRectangle *area,
				gxColorSpace space, gxColorSet aSet,
				gxColorProfile profile);


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help